import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from "../views/LoginView";
import IndexView from "../views/IndexView";
import StudentView from "../views/StudentView";
import CourseView from "@/views/CourseView";

const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView
  }, {
    path: '/index',
    name: 'index',
    component: IndexView,
    children: [
      {
        path: '/student',
        name: 'student',
        component: StudentView
      },
      {
        path: '/course',
        name: 'course',
        component: CourseView
      }
    ]
  }]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
